import 'package:flutter/material.dart';
import 'package:get/get.dart';

class FormPage1 extends StatelessWidget {
  var _username=new TextEditingController();
  var _sex=1;
  var _height=new TextEditingController();
  var _weight=new TextEditingController();

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('新建量体数据(1/3)'),
      ),
      body: ListView(
        children: [
          Container(
            height: 50,
            padding: EdgeInsets.only(left: 10),
            alignment: Alignment.centerLeft,
            child: Row(
              children: [
                Icon(Icons.assignment_late_outlined,color: Colors.blueAccent,),
                Text(
                  '请输入必要信息使用量体功能',
                  style: TextStyle(fontSize: 15, fontWeight: FontWeight.w600, color: Colors.grey),
                ),
              ],
            ),
          ),
          SizedBox(height: 10.0),
          Container(
            padding: EdgeInsets.only(left: 14.0, right: 14.0),
            decoration: BoxDecoration(
              border: Border(
                bottom: BorderSide(
                    width: 1.0, color: Theme.of(context).dividerColor //获取主题颜色
                ),
              ),
            ),
            child: Row(
              children: [
                Container(
                  width: 100.0,
                  child: Text('姓名',style: TextStyle(fontSize: 16.0, color: Colors.black87),),
                ),
                Expanded(
                  child:TextField(
                    decoration: InputDecoration(
                      border: InputBorder.none,
                      hintText: '请输入用户名',
                    ),
                    controller: _username,
                  )
                )
              ],
            ),
          ),
          SizedBox(height: 10.0),
          Container(
            padding: EdgeInsets.only(left: 14.0, right: 14.0),
            decoration: BoxDecoration(
              border: Border(
                bottom: BorderSide(
                    width: 1.0, color: Theme.of(context).dividerColor //获取主题颜色
                ),
              ),
            ),
            child: Row(
              children: [
                Container(
                  width: 100.0,
                  child: Text('性别',style: TextStyle(fontSize: 16.0, color: Colors.black87),),
                ),
                Container(
                  margin: EdgeInsets.only(right: 20 ),
                  child: Row(
                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
                    children: [
                      Radio(
                        value: 1,
                        groupValue: this._sex,
                        onChanged: (int? v){},
                      ),
                      Text('男'),
                      SizedBox(width: 10,),
                      Radio(
                        value: 2,
                        groupValue: this._sex,
                        onChanged: (int? v){},
                      ),
                      Text('女'),
                    ],
                  )
                )
              ],
            ),
          ),
          SizedBox(height: 10.0),
          Container(
            padding: EdgeInsets.only(left: 14.0, right: 14.0),
            decoration: BoxDecoration(
              border: Border(
                bottom: BorderSide(
                    width: 1.0, color: Theme.of(context).dividerColor //获取主题颜色
                ),
              ),
            ),
            child: Row(
              children: [
                Container(
                  width: 100.0,
                  child: Text('身高',style: TextStyle(fontSize: 16.0, color: Colors.black87),),
                ),
                Expanded(
                    child:TextField(
                      decoration: InputDecoration(
                        border: InputBorder.none,
                        hintText: '请输入用户名',
                      ),
                      controller: _username,
                    )
                ),
                Text('CM'),
              ],
            ),
          ),
          SizedBox(height: 10.0),
          Container(
            padding: EdgeInsets.only(left: 14.0, right: 14.0),
            decoration: BoxDecoration(
              border: Border(
                bottom: BorderSide(
                    width: 1.0, color: Theme.of(context).dividerColor //获取主题颜色
                ),
              ),
            ),
            child: Row(
              children: [
                Container(
                  width: 100.0,
                  child: Text('体重',style: TextStyle(fontSize: 16.0, color: Colors.black87),),
                ),
                Expanded(
                    child:TextField(
                      decoration: InputDecoration(
                        border: InputBorder.none,
                        hintText: '请输入用户名',
                      ),
                      controller: _username,
                    )
                ),
                Text('KG'),
              ],
            ),
          ),
          SizedBox(height: 20.0),
          Row(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              Expanded(
                child: Container(
                  height: 40.0,
                  margin: EdgeInsets.all(10),
                  child: ElevatedButton(
                    style: ButtonStyle(backgroundColor: MaterialStateProperty.all(Colors.teal)),
                    child: Text(
                      "下一步",
                      style: TextStyle(
                        fontSize: 16,
                      ),
                    ),
                    onPressed: () {},
                  ),
                ),
              ),
            ],
          ),

        ],
      ),
    );
  }
}
